<div>
    <h2 data-translate="milkbeeApp.exchangeRecord.home.title">Exchange Records</h2>
    <jhi-alert></jhi-alert>
    <br/>
    <ul class="nav nav-tabs">
		<li role="presentation" ng-class="{'active':vm.stat==1}"><a ui-sref="myexchange({stat:'1'})" data-translate="milkbeeApp.exchangeRecord.state.apply"></a></li>
		<li role="presentation" ng-class="{'active':vm.stat==2}"><a ui-sref="myexchange({stat:'2'})" data-translate="milkbeeApp.exchangeRecord.state.agree"></a></li>
		<li role="presentation" ng-class="{'active':vm.stat==3}"><a ui-sref="myexchange({stat:'3'})" data-translate="milkbeeApp.exchangeRecord.state.complite"></a></li>
		<li role="presentation" ng-class="{'active':vm.stat==4}"><a ui-sref="myexchange({stat:'4'})" data-translate="milkbeeApp.exchangeRecord.state.deny"></a></li>
	</ul>
    <div class="table-responsive">
        <table class="jh-table table table-striped">
            <thead>
                <tr jh-sort="vm.predicate" ascending="vm.reverse" callback="vm.transition()">
                    <th jh-sort-by="name"><span data-translate="milkbeeApp.exchangeRecord.name">Name</span> <span class="glyphicon glyphicon-sort"></span></th>
                    <th jh-sort-by="cost"><span data-translate="milkbeeApp.exchangeRecord.cost">Cost</span> <span class="glyphicon glyphicon-sort"></span></th>
                    <th jh-sort-by="quantum"><span data-translate="milkbeeApp.exchangeRecord.quantum">Quantum</span> <span class="glyphicon glyphicon-sort"></span></th>
                    <th jh-sort-by="createdAt"><span data-translate="milkbeeApp.exchangeRecord.createdAt">Created At</span> <span class="glyphicon glyphicon-sort"></span></th>
                    <th jh-sort-by="schedule"><span data-translate="milkbeeApp.exchangeRecord.schedule">Schedule</span> <span class="glyphicon glyphicon-sort"></span></th>
                    <th></th>
                </tr>
            </thead>
            <tbody>
                <tr ng-repeat="exchangeRecord in vm.exchangeRecords track by exchangeRecord.id">
                    <td>{{exchangeRecord.name}}</td>
                    <td>{{exchangeRecord.cost}}</td>
                    <td>{{exchangeRecord.quantum}}</td>
                    <td>{{exchangeRecord.createdAt | date:'medium'}}</td>
                    <td>{{exchangeRecord.schedule}}</td>
                    <td class="text-right">
                        <div class="btn-group flex-btn-group-container">
                            <button type="submit"
                                    ng-click="vm.agree({id:exchangeRecord.id})"
                                    class="btn btn-info btn-sm">
                                <span class="glyphicon glyphicon-ok"></span>
                                <span class="hidden-xs hidden-sm" data-translate="entity.action.agreeexchange"></span>
                            </button>
                            <button type="submit"
                                    ng-click="vm.deny({id:exchangeRecord.id})"
                                    class="btn btn-info btn-sm">
                                <span class="glyphicon glyphicon-remove"></span>
                                <span class="hidden-xs hidden-sm" data-translate="entity.action.deny"></span>
                            </button>
                        </div>
                    </td>
                </tr>
            </tbody>
        </table>
    </div>
    <div class="text-center">
        <jhi-item-count page="vm.page" total="vm.queryCount" items-per-page="vm.itemsPerPage"></jhi-item-count>
        <uib-pagination class="pagination-sm" total-items="vm.totalItems" items-per-page="vm.itemsPerPage" ng-model="vm.page" ng-change="vm.transition()"></uib-pagination>
    </div>
</div>
